<?php
/**
 * Created by PhpStorm.
 * Author: D H
 * Date: 2017/6/16
 * Time: 14:14
 */
namespace app\android\controller;
use app\api\logic\Product as Products;
use think\Request;
use tool\Common;

class Product extends Base {
    //根据品牌得到产品列表
    public function getProductListByBrandID(){
        /*$data = json_decode(Request::instance()->getInput(),true);
        $object = new Products();
        $package = $object->init($data)->getProductListByBrandID();
        Common::json($package);*/

        return json((new Products($this->request))->getProductListByBrandID());
    }
    //根据产品ID得到产品详情
    public function getProductByProductID(){
        return json((new Products($this->request))->getProductByProductID());
    }
    //添加对比产品
    public function addContrast(){
        return json((new Products($this->request))->addContrast());
    }
    //得到对比装备列表
    public function getContrastList(){
        return json((new Products($this->request))->getContrastList());
    }
    //产品对比
    public function contrastProduct(){
        return json((new Products($this->request))->contrastProduct());
    }
}